<?php
namespace Home\Controller;
use Think\Controller;

class UserController extends Controller{
    
    public function index(){
        $this->display();
    }
    
    public function login(){
        $username = $_POST['username'];
        $password = $_POST['password'];
        echo '{"id":"1","username":"'.$username.'", "password":"'.$password.'"}';
    }
    
    public function  register(){
        $username = $_POST['username'];
        $password = $_POST['password'];
        $email = $_POST['email'];
        echo '{"id":"1","username":"'.$username.'", "password":"'.$password.'", "email":"'.$email.'"}';
    }
}